﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="XoaSuaNguoiDung.aspx.cs" Inherits="NguoiDung" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="ThemSP">
        <table>
            <tr>
                <td>Quản Trị
                    <asp:DropDownList ID="DropDownList3" runat="server" DataSourceID="AccessDataSource4" DataTextField="ID" DataValueField="ID"></asp:DropDownList>
                    <asp:AccessDataSource ID="AccessDataSource4" runat="server" DataFile="~/App_Data/Data.mdb" SelectCommand="SELECT ID FROM NGUOIDUNG WHERE (PhanQuyen = '1')"></asp:AccessDataSource>
                    <asp:Button ID="BtnQuanTri" runat="server" Text=" Quản Trị" Width="227px" OnClick="BtnQuanTri_Click" CssClass="myButton" />
                </td>
                <td>Có Hiệu Lực
        <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="AccessDataSource1" DataTextField="ID" DataValueField="ID"></asp:DropDownList>
                    <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Data.mdb" SelectCommand="SELECT ID FROM NGUOIDUNG WHERE (PhanQuyen = '2')"></asp:AccessDataSource>
                    <asp:Button ID="BtnXemnguoidung" runat="server" Text=" Người Dùng Còn Hiệu Lực " OnClick="BtnXemnguoidung_Click" Width="245px" CssClass="myButton" />
                </td>
                <td>Vô Hiệu Lực
                    <asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="AccessDataSource3" DataTextField="ID" DataValueField="ID">
                    </asp:DropDownList>
                    <asp:AccessDataSource ID="AccessDataSource3" runat="server" DataFile="~/App_Data/Data.mdb" SelectCommand="SELECT ID FROM NGUOIDUNG WHERE (PhanQuyen = - 1)"></asp:AccessDataSource>
                    <asp:Button ID="btnXemNguoidungVo" runat="server" Text="Người Dùng Còn Hiệu Lực" Width="225px" OnClick="btnXemNguoidungVo_Click" CssClass="myButton" />
                </td>
                <td>
                    <div id="nutbam" runat="server">
                    <asp:Button ID="SuaUSER" runat="server" Text="Thông Tin và Quyền " OnClick="SuaUSER_Click" CssClass="myButton" Width="160px" Height="30px" /><br /><br />
                    <asp:Button ID="doimk" runat="server" Text="Đổi Mật Khẩu" OnClick="doimk_Click"  CssClass="myButton" Width="150px" Height="30px" /><br />
                        </div>
                </td>

            </tr>
        </table>


        <div id="XemTT" runat="server">
            <p>Thông Tin Chi Tiết</p>
            <table>
                <tr>
                    <td>
                        <asp:DataList ID="DataList1" runat="server" DataKeyField="ID" DataSourceID="AccessDataSource2">
                            <ItemTemplate>
                            <table>
                            <tr>
                                <td class="td-User">ID:</td>
                                <td><asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' /></td>
                            </tr>
                            <tr>
                                <td class="td-User">Email:</td>
                                <td><asp:Label ID="EMAILLabel" runat="server" Text='<%# Eval("EMAIL") %>' /></td>
                            </tr>
                            <tr>
                                <td class="td-User">Ngày Sinh:</td>
                                <td><asp:Label ID="NGAYSINHLabel" runat="server" Text='<%# Eval("NGAYSINH") %>' /></td>
                            </tr>
                            <tr>
                                <td class="td-User">Ngày Đăng Ký:</td>
                                <td><asp:Label ID="NGAYDKLabel" runat="server" Text='<%# Eval("NGAYDK") %>' /></td>
                            </tr>
                            <tr>
                                <td class="td-User">Câu Hỏi Bảo Mật:</td>
                                <td><asp:Label ID="CUAHOIBAOMATLabel" runat="server" Text='<%# Eval("CUAHOIBAOMAT") %>' /></td>
                            </tr>
                            <tr>
                                <td class="td-User">Trả Lời:</td>
                                <td><asp:Label ID="TRALOILabel" runat="server" Text='<%# Eval("TRALOI") %>' /></td>
                            </tr>
                            <tr>
                                <td class="td-User">Giới Tính:</td>
                                <td><asp:Label ID="GioiTinhLabel" runat="server" Text='<%# Eval("GioiTinh") %>' /></td>
                            </tr>
                            <tr>
                                <td class="td-User">Tên Đầy Đủ:</td>
                                <td><asp:Label ID="TENFULLLabel" runat="server" Text='<%# Eval("TENFULL") %>' /></td>
                            </tr>
                            <tr>
                                <td class="td-User">Phân Quyền:</td>
                                <td><asp:Label ID="PhanQuyenLabel" runat="server" Text='<%# Eval("PhanQuyen") %>' /></td>
                            </tr>
                            <tr>
                                <td class="td-User">CMND:</td>
                                <td><asp:Label ID="CMNDLabel0" runat="server" Text='<%# Eval("CMND") %>' /></td>
                            </tr>
                            </table>
                            </ItemTemplate>
                        </asp:DataList>
                        <asp:AccessDataSource ID="AccessDataSource2" runat="server" DataFile="~/App_Data/Data.mdb" SelectCommand="SELECT [ID], [EMAIL], [NGAYSINH], [NGAYDK], [CMND], [CUAHOIBAOMAT], [TRALOI], [GioiTinh], [TENFULL], [PhanQuyen] FROM [NGUOIDUNG] WHERE ([ID] = ?)">
                            <SelectParameters>
                                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="String" />
                            </SelectParameters>
                        </asp:AccessDataSource>
                    </td>

                </tr>
            </table>
        </div>
        <div id="ThayDoiTT" runat="server">
            <p> Đổi Thông Tin </p>
            <table>
                <tr>
                    <td class="td-User">ID</td>
                    <td>
                        <asp:TextBox ID="SuaID" runat="server" ReadOnly="True"></asp:TextBox><br />
                    </td>
                </tr>
                <tr>
                    <td class="td-User">Email</td>
                    <td>
                        <asp:TextBox ID="SuaEmail" runat="server"></asp:TextBox><br>
                    </td>
                </tr>
                <tr>
                    <td class="td-User">Ngày Sinh </td>
                    <td>
                        <asp:DropDownList ID="Ngay" runat="server">
                        </asp:DropDownList>
                        <asp:DropDownList ID="Thang" runat="server">
                        </asp:DropDownList>
                        <asp:DropDownList ID="Nam" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="td-User">Câu Hỏi Bảo Mật</td>
                    <td>
                        <asp:DropDownList ID="DropDownList4" runat="server">
                            <asp:ListItem Value="1">Chọn C&#226;u hỏi</asp:ListItem>
                            <asp:ListItem Value="Trường Học Đầu Ti&#234;n Của Bạn">Trường Học Đầu Ti&#234;n Của Bạn</asp:ListItem>
                            <asp:ListItem Value="Nh&#224; Bạn C&#243; Mấy Người">Nh&#224; Bạn C&#243; Mấy Người</asp:ListItem>
                            <asp:ListItem Value="C&#244; Gi&#225;o Bạn T&#234;n G&#236;">C&#244; Gi&#225;o Bạn T&#234;n G&#236;</asp:ListItem>
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td class="td-User">Trả Lời</td>
                    <td>
                        <asp:TextBox ID="SuaTraLoi" runat="server"></asp:TextBox><br />
                    </td>
                </tr>
                <tr>
                    <td class="td-User">Giới Tính </td>
                    <td>
                        <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="Nam">Nam</asp:ListItem>
                            <asp:ListItem Value="Nữ">Nữ</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="td-User">CMND </td>
                    <td>
                        <asp:TextBox ID="suaCMND" runat="server"></asp:TextBox><br />
                    </td>
                </tr>
                <tr>
                    <td class="td-User">Tên Họ </td>
                    <td>
                        <asp:TextBox ID="SuaTenFull" runat="server"></asp:TextBox><br />
                    </td>
                </tr>
                <tr>
                    <td class="td-User">Phân Quyền </td>
                    <td>
                        <asp:DropDownList ID="PhanQuyen" runat="server">
                            <asp:ListItem Value="1">1</asp:ListItem>
                            <asp:ListItem Value="2">2</asp:ListItem>
                            <asp:ListItem Value="-1">-1</asp:ListItem>
                        </asp:DropDownList><br />

                    </td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td>
                        <asp:Button ID="ThayDoi" runat="server" Text="Thay Đổi" OnClick="ThayDoi_Click" CssClass="myButton" />
                        <asp:Label ID="thongbao" runat="server" Text=" "></asp:Label>
                        <asp:Label ID="ThongbaoTT" runat="server" Text=" "></asp:Label>
                    </td>
                </tr>

            </table>
        </div>
        <div id="divDoiMAT" runat="server">
            <p> Đổi Mật Khẩu </p>
            <table>
            <tr>
                    <td class="td-User">ID </td>
                    <td>
                        <asp:TextBox ID="DKID" runat="server" ReadOnly="True"></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="td-User">Mật Khẩu </td>
                    <td>
                        <asp:TextBox ID="SuaPass" runat="server" TextMode="Password"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="SuaPass" ErrorMessage="Phải Có Chữ Và Số" ValidationExpression="(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{1,100})$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="td-User"> Nhập Lại Mật Khẩu </td>
                    <td>
                        <asp:TextBox ID="IDMK" runat="server" TextMode="Password"></asp:TextBox>
                        <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="SuaPass" ControlToValidate="IDMK" ErrorMessage="Không Giống Nhau"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <asp:Button ID="btnDOIMK" runat="server" Text="Đổi" CssClass="myButton" OnClick="btnDOIMK_Click"/>
                        <asp:Label ID="ThongBAoMK" runat="server" Text=" "></asp:Label>
                       
                    </td>
                </tr>
                </table>

        </div>
        </div>
</asp:Content>

